#ifndef SCINTILLA_H
#define SCINTILLA_H
#include <QWidget>
#include <QtGui/QMouseEvent>
#include <Qsci/qsciscintilla.h>
#include <QtGui/QMenu>
#include <QAction>
#include <QRegExp>
class Scintilla:public QsciScintilla
{
	Q_OBJECT
	public:
		Scintilla(QWidget* parent);
		virtual ~Scintilla();
	
	private slots:
		void SendFileName(void);
		void SendTextForDeclaration(void);
		void SendTextForImplementation(void);
	
	protected slots:
                virtual void mousePressEvent ( QMouseEvent *e );
	private:
		QString convertTextS2Q(const char *s) const;
		bool isUtf8()const;
		QString GetTextRange();
		void CreateMenu();
		QString KeyText;
		QString MatchText;
		QMenu* PopMenu;
		QAction* ActCopy;
        QAction* ActCut ;
        QAction* ActPaste;
        QAction* ActDelete;
        QAction* ActToggleComment;
        QAction* ActBlockComment ;
        QAction* ActBlockStream ;
        QAction* ActUnComment ;
		QAction* ActDeclaration;
		QAction* ActImplementation;
		QAction* ActHeader;
       signals:
         void ToggleCommentSignal(void);
         void BlockCommentSignal(void);
         void BlockStreamSignal(void);
         void UnCommentSignal(void);
		 void SendFileNameSignal(const QString Text);
		 void SendTextForDecSignal(const QString Text);
		 void SendTextForImpSignal(const QString text);
};
#endif
